<?php
/**
 * Created by zengxianfen on 2020/7/17 16:55.
 */

namespace App\Controller;

use App\Model\Service\SMSService;
use App\Request\SMSRequest;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\PostMapping;

/**
 * @Controller()
 * Class SMSController
 * @package App\Controller
 */
class SMSController extends AbstractController
{
    /**
     * @Inject()
     * @var SMSService
     */
    protected $service;

    /**
     * @PostMapping("/code")
     * @author zengxianfen 2020/7/17
     */
    public function getCode(SMSRequest $request){
        $rs = $this->service->getCode($request->all());
        return $this->success('', $rs);
    }
}